import { SelectProps } from '@arco-design/web-vue/es/select';
import { Size } from '@arco-design/web-vue/es/_utils/constant';
import { CSSProperties } from 'vue';

export interface AnyObject {
  [key: string]: unknown;
}

export interface Options {
  value: unknown;
  label: string;
}

export interface NodeOptions extends Options {
  children?: NodeOptions[];
}

export interface GetParams {
  body: null;
  type: string;
  url: string;
}

export interface PostData {
  body: string;
  type: string;
  url: string;
}

export interface Pagination {
  total?: number;
  current?: number;
  defaultCurrent?: number;
  pageSize?: number;
  defaultPageSize?: number;
  disabled?: boolean;
  hideOnSinglePage?: boolean;
  simple?: boolean;
  showTotal?: boolean;
  showMore?: boolean;
  showJumper?: boolean;
  showPageSize?: boolean;
  pageSizeOptions?: number[];
  pageSizeProps?: SelectProps;
  size?: Size;
  pageItemStyle?: CSSProperties;
  activePageItemStyle?: CSSProperties;
  baseSize?: number;
  bufferSize?: number;
}

export const PaginationModel: Pagination = {
  total: 0,
  current: 1,
  defaultCurrent: 1,
  pageSize: 50,
  defaultPageSize: 50,
  disabled: false,
  hideOnSinglePage: false,
  simple: false,
  showTotal: true,
  showMore: false,
  showJumper: false,
  showPageSize: true,
  pageSizeOptions: [10, 20, 50, 100, 200],
  pageSizeProps: {},
  size: 'mini',
};

export type TimeRanger = [string, string];

export interface GeneralChart {
  xAxis: string[];
  data: Array<{ name: string; value: number[] }>;
}
